// https://www.luogu.com.cn/problem/P1223

#include <iostream>
#include <vector>
#include <queue>
using namespace std;

struct Body {
    int m;
    int v;
    double avg;
};

struct Compare {
    bool operator()(const Body& t1, const Body& t2) const {
        return t1.avg < t2.avg;
    }
};

int main() {
    int n, m, t1, t2;
    scanf("%d%d", &n, &m);
    priority_queue<Body, vector<Body>, Compare> Q;
    for (int i = 0; i < n; i++) {
        scanf("%d %d", &t1, &t2);
        double avg = (double) t2 / t1;
        Body body;
        body.m = t1;
        body.v = t2;
        body.avg = avg;
        Q.push(body);
    }

    double ans = 0.0;
    while (!Q.empty() && m > 0) {
        Body body = Q.top();
        Q.pop();
        if (body.m <= m) {
            m -= body.m;
            ans += body.v;
        } else {
            ans += body.avg * m;
            break;
        }
    }
    printf("%.2lf\n", ans);
    return 0;
}